***This do-file runs the regressions found in table O1 of the appendix
**Curtis RESTAT
**Change to directory where data and code were downloaded
**cd 

local groups all A02 A03 A04 A05 A06 A07 A08 
local out_vars lempend  lemps lemp hires_rate seps_rate hire_rate sep_rate lhiras lseps lhira lsep nempsep lnhiras lnhirns  
	
	
	
foreach group in `groups' {

use "qwi_`group'_tableO2.dta",clear
qui do qwi_dataprep_tableO2.do
unique state
qui gen lemps=ln(emps+1)
qui gen lemp=ln(emp+1)
qui gen lempend=ln(empend+1)
qui gen lhiras=ln(hiras+1)
qui gen lhira=ln(hira+1)
qui gen lseps=ln(seps+1)
qui gen lsep=ln(sep+1)
qui gen lcreation=ln(frmjbgn+1)
qui gen ldestruction=ln(frmjbls+1)
qui gen lcreations=ln(frmjbgns+1)
qui gen ldestructions=ln(frmjblss+1)
qui gen hire_rate=hira/emps
qui gen sep_rate=sep/emps
qui gen cr_rate=frmjbgn/emps
qui gen de_rate=frmjbls/emps
qui gen hires_rate=hiras/emps
qui gen seps_rate=seps/emps
qui gen crs_rate=frmjbgns/emps
qui gen des_rate=frmjblss/emps
gen learns=ln(earns)
gen lpayroll=ln(payroll)
gen lnhirns=ln(earnhirns)
gen lnhiras=ln(earnhiras)

tabstat emp hires_rate seps_rate earns earnhirns nempsep, stat(mean sd)
}
